package com.ruoyi.dataSet.service;

import com.ruoyi.dataSet.DTO.DatasetCreateRequest;
import com.ruoyi.dataSet.http.HttpClient;
import org.springframework.stereotype.Service;

import java.io.IOException;

@Service
public class DatasetService {

    // 创建知识库
    public String createDataset(DatasetCreateRequest request) throws IOException {
        return HttpClient.createDataset(request);
    }

    // 获取知识库列表
    public String getDatasets(String page, String limit) throws IOException {
        return HttpClient.getDatasets(page, limit);
    }

    // 删除知识库
    public String deleteDataset(String datasetId) throws IOException {
        return HttpClient.deleteDataset(datasetId);
    }

    // 获取知识库的状态
    public String getDatasetStatus(String datasetId) throws IOException {
        return HttpClient.getDatasetStatus(datasetId);
    }
}
